package com.ido.news.splashlibrary.contract

import android.content.Context
import com.ido.news.splashlibrary.bean.BeanResponse
import com.ido.news.splashlibrary.callback.HttpCallBack

interface SplashContract {

    interface BaseSplashView {
        fun showOtherSDK(flag:String,showMode:Int,downloadMode:Int)
        fun showImg(url: String, id: String)
        fun setDownloadClick(fileUrl: String, titleName: String, packageName: String, iconUrl: String,index:Int,id: String)
        fun setOpenClick(url: String,index:Int,id: String)
        fun getContext(): Context
        fun onError(msg: String)
    }


    abstract class BaseSplashModel {
        abstract fun getResponse(context: Context, url: String, channel: String, packageName: String, version: String, callback: HttpCallBack)
        abstract fun cancelRequest()
        abstract fun saveCache(context: Context, json: String): Boolean
        abstract fun getCache(context: Context): BeanResponse?
        abstract fun DBClose()
    }

    abstract class BaseSplashPresenter {
        abstract fun getResponse()
        abstract fun onAttach( viewBase: BaseSplashView)
        abstract fun onDetach()
        abstract fun SDKFail()
    }
}